//
//  RankViewController.m
//  dmao-customer
//
//  Created by macbook on 2017/10/12.
//  Copyright © 2017年 秦慕乔. All rights reserved.
//

#import "RankViewController.h"

@interface RankViewController ()<WKNavigationDelegate>
@property (strong, nonatomic) WKWebView *WKWeb;
@end

@implementation RankViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    _WKWeb = [[WKWebView alloc] initWithFrame:CGRectMake(0, 20, WIDTH, HEIGHT-20)];
    _WKWeb.navigationDelegate = self;
    [self.view addSubview:_WKWeb];
    [_WKWeb loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:API(RankHome)]]];
}

// 页面开始加载时调用
- (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation{
    [self.view loadingOnAnyView];
}

// 页面加载完成之后调用
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation{
    [self.view removeAnyView];
}

- (void)viewWillAppear:(BOOL)animated
{
    self.navigationController.navigationBarHidden = YES;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
